package com.xnyzc.lhy.common.component.mapper;

import com.xnyzc.lhy.common.entity.OaGatewayIgnore;
import com.xnyzc.lhy.common.entity.PangClient;
import com.xnyzc.lhy.common.entity.PangRoute;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 秘钥获取
 *
 * @author zhengxu
 */
public interface GatewayMapper {
    /**
     * 获取客户端秘钥
     *
     * @return
     */
    @Select("select client_id clientId,client_secret clientSecurity,token_validity tokenValidity from oa_gateway_oauth_client where deleted=0")
    List<PangClient> getClientSecret();


    /**
     * 获取客户端秘钥
     *
     * @return
     */
    @Select("select sys_code sysCode, route route from oa_gateway_route where deleted=0")
    List<PangRoute> getRouteList();

    /**
     * 获取网关验签忽略表
     *
     * @return
     */
    @Select("SELECT ignore_url ignoreUrl FROM `oa_gateway_ignore` where deleted=0")
    List<OaGatewayIgnore> getSignIgnoreList();
}
